package com.culturaltourism.admin.controller;

import com.culturaltourism.admin.pojo.SysUser;
import com.culturaltourism.admin.service.SysUserService;
import com.culturaltourism.core.dto.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName SysUserController
 * @Description TODO
 * @Author MaShuai
 * @Date 2019/5/7 17:11
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "/user")
public class SysUserController {

    private static Logger log = LoggerFactory.getLogger(SysUserController.class);

    @Autowired
    private SysUserService sysUserService;

    @GetMapping(value = "/{id}")
    public Result getSysUser(@PathVariable("id") Long id) {
        return null;
    }

    @GetMapping(value = "/list")
    public Result getSysUserList(Integer page, Integer limit) {
        return sysUserService.getSysUserList(page, limit);
    }

    @PostMapping
    public Result addSysUser(SysUser sysUser) {
        return null;
    }

    @PutMapping(value = "/{id}")
    public Result updateSysUser(@PathVariable("id") Long id, SysUser sysUser) {
        return null;
    }

    @DeleteMapping(value = "/{id}")
    public Result deleteSysUser(@PathVariable("id") Long id) {
        return null;
    }

}
